package com.sand.entity;

import javax.persistence.*;
import java.util.Objects;

@Entity
@Table(name = "t_common_type_group", schema = "ssh_pro", catalog = "")
public class TCommonTypeGroupEntity {
    /**
     * @author <achao1441470436@gmail.com>
     * @since 2021/11/28/028 14:46
     */
    private int id;
    private String groupName;
    private String groupLabel;
    private int enable;

    @Id
    @Column(name = "ID")
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Basic
    @Column(name = "GROUP_NAME")
    public String getGroupName() {
        return groupName;
    }

    public void setGroupName(String groupName) {
        this.groupName = groupName;
    }

    @Basic
    @Column(name = "GROUP_LABEL")
    public String getGroupLabel() {
        return groupLabel;
    }

    public void setGroupLabel(String groupLabel) {
        this.groupLabel = groupLabel;
    }

    @Basic
    @Column(name = "ENABLE")
    public int getEnable() {
        return enable;
    }

    public void setEnable(int enable) {
        this.enable = enable;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        TCommonTypeGroupEntity that = (TCommonTypeGroupEntity) o;
        return id == that.id && enable == that.enable && Objects.equals(groupName, that.groupName) && Objects.equals(groupLabel, that.groupLabel);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, groupName, groupLabel, enable);
    }
}
